#include <hxcpp.h>

#ifndef INCLUDED_cpp_CppInt32__
#include <cpp/CppInt32__.h>
#endif
#ifndef INCLUDED_jax_lang_JCharSequence
#include <jax/lang/JCharSequence.h>
#endif
#ifndef INCLUDED_jax_lang_JString
#include <jax/lang/JString.h>
#endif
namespace jax{
namespace lang{

Void JString_obj::__construct(::String s)
{
{
	HX_SOURCE_POS("Source/jax/lang/JString.hx",9)
	this->val = s;
}
;
	return null();
}

JString_obj::~JString_obj() { }

Dynamic JString_obj::__CreateEmpty() { return  new JString_obj; }
hx::ObjectPtr< JString_obj > JString_obj::__new(::String s)
{  hx::ObjectPtr< JString_obj > result = new JString_obj();
	result->__construct(s);
	return result;}

Dynamic JString_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< JString_obj > result = new JString_obj();
	result->__construct(inArgs[0]);
	return result;}

hx::Object *JString_obj::__ToInterface(const type_info &inType) {
	if (inType==typeid( ::jax::lang::JCharSequence_obj)) return operator ::jax::lang::JCharSequence_obj *();
	return super::__ToInterface(inType);
}

int JString_obj::charAt( ::cpp::CppInt32__ i){
	HX_SOURCE_PUSH("JString_obj::charAt")
	HX_SOURCE_POS("Source/jax/lang/JString.hx",12)
	return this->val.charCodeAt(::cpp::CppInt32___obj::toInt(i));
}


HX_DEFINE_DYNAMIC_FUNC1(JString_obj,charAt,return )

::jax::lang::JCharSequence JString_obj::subSequence( ::cpp::CppInt32__ s,::cpp::CppInt32__ e){
	HX_SOURCE_PUSH("JString_obj::subSequence")
	HX_SOURCE_POS("Source/jax/lang/JString.hx",15)
	return ::jax::lang::JString_obj::__new(this->val.substr(::cpp::CppInt32___obj::toInt(s),::cpp::CppInt32___obj::toInt(::cpp::CppInt32___obj::sub(e,s))));
}


HX_DEFINE_DYNAMIC_FUNC2(JString_obj,subSequence,return )

::String JString_obj::toLowerCase( ){
	HX_SOURCE_PUSH("JString_obj::toLowerCase")
	HX_SOURCE_POS("Source/jax/lang/JString.hx",18)
	return this->val.toLowerCase();
}


HX_DEFINE_DYNAMIC_FUNC0(JString_obj,toLowerCase,return )

::String JString_obj::toUpperCase( ){
	HX_SOURCE_PUSH("JString_obj::toUpperCase")
	HX_SOURCE_POS("Source/jax/lang/JString.hx",21)
	return this->val.toUpperCase();
}


HX_DEFINE_DYNAMIC_FUNC0(JString_obj,toUpperCase,return )

int JString_obj::length( ){
	HX_SOURCE_PUSH("JString_obj::length")
	HX_SOURCE_POS("Source/jax/lang/JString.hx",24)
	return this->val.length;
}


HX_DEFINE_DYNAMIC_FUNC0(JString_obj,length,return )

::String JString_obj::toString( ){
	HX_SOURCE_PUSH("JString_obj::toString")
	HX_SOURCE_POS("Source/jax/lang/JString.hx",27)
	return this->val;
}


HX_DEFINE_DYNAMIC_FUNC0(JString_obj,toString,return )

::String JString_obj::toNative( ){
	HX_SOURCE_PUSH("JString_obj::toNative")
	HX_SOURCE_POS("Source/jax/lang/JString.hx",30)
	return this->val;
}


HX_DEFINE_DYNAMIC_FUNC0(JString_obj,toNative,return )


JString_obj::JString_obj()
{
}

void JString_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(JString);
	HX_MARK_MEMBER_NAME(val,"val");
	HX_MARK_END_CLASS();
}

void JString_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(val,"val");
}

Dynamic JString_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 3:
		if (HX_FIELD_EQ(inName,"val") ) { return val; }
		break;
	case 6:
		if (HX_FIELD_EQ(inName,"charAt") ) { return charAt_dyn(); }
		if (HX_FIELD_EQ(inName,"length") ) { return length_dyn(); }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"toString") ) { return toString_dyn(); }
		if (HX_FIELD_EQ(inName,"toNative") ) { return toNative_dyn(); }
		break;
	case 11:
		if (HX_FIELD_EQ(inName,"subSequence") ) { return subSequence_dyn(); }
		if (HX_FIELD_EQ(inName,"toLowerCase") ) { return toLowerCase_dyn(); }
		if (HX_FIELD_EQ(inName,"toUpperCase") ) { return toUpperCase_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic JString_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 3:
		if (HX_FIELD_EQ(inName,"val") ) { val=inValue.Cast< ::String >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void JString_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("val"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	String(null()) };

static ::String sMemberFields[] = {
	HX_CSTRING("val"),
	HX_CSTRING("charAt"),
	HX_CSTRING("subSequence"),
	HX_CSTRING("toLowerCase"),
	HX_CSTRING("toUpperCase"),
	HX_CSTRING("length"),
	HX_CSTRING("toString"),
	HX_CSTRING("toNative"),
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
};

static void sVisitStatics(HX_VISIT_PARAMS) {
	HX_VISIT_MEMBER_NAME(JString_obj::__mClass,"__mClass");
};

Class JString_obj::__mClass;

void JString_obj::__register()
{
	Static(__mClass) = hx::RegisterClass(HX_CSTRING("jax.lang.JString"), hx::TCanCast< JString_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics, sVisitStatics);
}

void JString_obj::__boot()
{
}

} // end namespace jax
} // end namespace lang
